package com.yztc.xiami_app.ui.receiveaddress.model;

import android.content.Context;

import com.yztc.xiami_app.bean.ssq.Address;
import com.yztc.xiami_app.db.AddressManager;

import java.util.List;

/**
 * Created by 周旭 on 2016/11/18.
 * "收货地址"Model的实现类
 */

public class ReceiveAddressModelImpl implements IReceiveAddressModel{

    //根据省份名获取所有的市列表
    @Override
    public List<Address> getCities(Context context,String pName) {
        AddressManager manager = new AddressManager(context);
        return manager.getCities(pName);
    }

    //根据城市名获取所有的区列表
    @Override
    public List<Address> getAreas(Context context, String cName) {
        AddressManager manager = new AddressManager(context);
        return manager.getAreas(cName);
    }
}
